package com.aks.server.controller.coach;

import com.aks.server.controller.BaseController;
import com.aks.server.domain.request.param.ActivityParam;
import com.aks.server.domain.request.param.TaskParam;
import com.aks.server.domain.response.ResponseResult;
import com.aks.server.service.CoachService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/coach")
public class CoachController extends BaseController {

    @Autowired
    private CoachService coachService;


    @RequestMapping("/activities")
    public @ResponseBody ResponseResult<?> getCoachActivities(@RequestBody ActivityParam activityParam) {
        return coachService.getCoachActivities(activityParam);
    }
    @RequestMapping("/activity/task")
    public @ResponseBody ResponseResult<?> getActivitityTask(@RequestBody TaskParam taskParam) {
        return coachService.getActivitityTask(taskParam);
    }
    @RequestMapping("/activity/dealcalcAmount")
    public @ResponseBody ResponseResult<?> dealcalcAmount(@RequestBody ActivityParam activityParam) {
        return coachService.dealcalcAmount(activityParam);
    }
    @RequestMapping("/activity/update")
    public @ResponseBody ResponseResult<?> update(@RequestBody ActivityParam activityParam) {
        return coachService.update(activityParam);
    }
}
